﻿@model  FCDB.Web.Models.LogOnViewModel
@{
    Layout = null;
}
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <title>富昌担保保函系统 - 登录</title>   
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <link href='@Url.Content("~/hplus/css/bootstrap.min.css?v=3.3.6")' rel="stylesheet">
   <link href='@Url.Content("~/hplus/css/font-awesome.min93e3.css?v=4.4.0")' rel="stylesheet">
    <link href='@Url.Content("~/hplus/css/animate.min.css")' rel="stylesheet">
    <link href='@Url.Content("~/hplus/css/style.min.css?v=4.1.0")' rel="stylesheet">
    <link href='@Url.Content("~/Content/kendo/2013.1.514/kendo.common.min.css")' rel="stylesheet" type="text/css">
    <link href='@Url.Content("~/Content/kendo/2013.1.514/kendo.dataviz.min.css")' rel="stylesheet" type="text/css">
    <link href='@Url.Content("~/Content/kendo/2013.1.514/kendo.default.min.css")' rel="stylesheet" type="text/css">
    <link href='@Url.Content("~/Content/kendo/2013.1.514/kendo.dataviz.default.min.css")' rel="stylesheet" type="text/css">
    <script src='@Url.Content("~/Scripts/kendo/2013.1.514/jquery-1.8.2.min.js")'></script>
 
 
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div> 
                <img src='@Url.Content("~/images/Group-Logo.png")' alt="">
            </div>
            <h3>欢迎使用 富昌担保保函系统</h3>
            @using (Html.BeginForm("Login", "Account", FormMethod.Post, new { id = "frm" })) {
                       
                            <div class="form-group">
                                <input type="UserName"   class="form-control" placeholder="用户名" required="" name="UserName">
                            </div>
                            <div class="form-group">
                                <input type="Password"  class="form-control" placeholder="密码" required="" name="Password">
                            </div>
                            <div class="form-group">
                                <input id="Captcha" class="col-sm-6 form-control" name="Captcha" placeholder="验证码" type="text" value="" /> 
                                <div class="col-sm-6">
                                    <img width="93px" id="validimg" height="32px" onclick="reloadcode()" src="@Url.Action("CreateImageCode", "GoogleCaptcha")" alt="验证码" />
                                    </div> 
                                </div>
                        <div class="form-group">
                            <span class="box_check" style="color: red;">
                                @Model.ErrorStr
                                <input data-val="true" id="RememberMe" name="RememberMe" type="checkbox" value="true">
                                <input name="RememberMe" type="hidden" value="false">
                                <label for="RememberMe">记住密码</label>
                            </span>
                        </div>

                            <div class="form-group">
                                <button type="submit" id="submit_in" class="btn btn-primary block full-width m-b">登 录</button>
                            </div>              
            }
        </div>
    </div>
  
    <script src='@Url.Content("~/hplus/js/bootstrap.min.js?v=3.3.6")'></script>
    <script type="text/javascript" src=@Url.Content("~/Scripts/lhgdialog.min.js")> </script>
    <script type="text/javascript">
        function inputFocus(tag) {
            $(tag).next().hide();
        } 
        function inputblur(tag) {
            var str = $(tag).val();
            if (str == "") {
                $(tag).next().show();
            } else {
                $(tag).next().hide();
            }
        }
        function reloadcode() {
            var verify = document.getElementById('validimg');
            $("#validimg").attr("src", '@Url.Content("~/GoogleCaptcha/CreateImageCode?")' + Math.random());
        }
        function onRefresh() {
            window.location.reload();
        }

        function OpenPop(url, titleName, width, height) {
            width = width || 650;
            height = height || 300;
            window.top.winObj = window;
            window.top.refresh = onRefresh;
            window.top.oDG = $.dialog({
                lock: true,
                background: '#FFF',
                opacity: 0.2,
                id: 'esDialog',
                title: titleName,
                titleAlign: 'left',
                content: "url:" + url,
                width: width,
                height: height,
                btnBar: false,
                lockScroll: true
            });
        }
        $(function () {
            inputblur("#UserName");
            inputblur("#Password"); 
            if ("@Model.ErrorStr" == "初始密码，需要修改") {
                alert("初始密码不能登录，请修改密码！");
                var url = '@Url.Action("ChangePassword", "Account")';
                OpenPop(url, "修改密码");
            }
            $("#submit_in").click(function () {
                $("#frm").submit();
            });
        });
    </script>
</body>
</html>


